package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.vo.HomePageVo;
import com.ruoyi.system.mapper.HomePageMapper;
import com.ruoyi.system.mapper.SysConfigMapper;
import com.ruoyi.system.service.IHomePageService;
import com.ruoyi.system.service.ISysConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @author lwq
 * @ClassName HomePageServiceImpl.java
 * @Description //TODO 首页数据统计业务$
 * @createTime 2022-06-23 15:55
 */
@Service
public class HomePageServiceImpl implements IHomePageService {

    @Autowired
    private HomePageMapper homePageMapper;

    /**
     * 查询首页统计数据
     * @return
     */
    @Override
    @Transactional
    public HomePageVo selectHomePageVo(){
        HomePageVo homePageVo=new HomePageVo();
        homePageVo=homePageMapper.selectReportCount();
        homePageVo.setCompanyCount(homePageMapper.selectCompanyCount());
        homePageVo.setExpertCount(homePageMapper.selectExpertCount());

        return homePageVo;
    }
}
